<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Description of MDL_Catogery
 *
 * @author Yoosuf
 */
class MDL_Posts extends Model {

    private $table='';

    function  __construct() {
        parent::Model();
    }

    function postGetAll(){
        $query=$this->db->get($this->table);
        return $query;
    }

    function postGetByID(){
        $query=$this->db->get_where($this->table, 'id');
        return $query;
    }

    function postAdd(){
        $query =$this->db->insert($this->table);
        return $query;
    }

    function postEdit(){
       $query=$this->db-set($this->table, 16);
       return $query;
    }

    function  postDelete(){
     $query=$this->db-delete($this->table, 16);
     return $query;
    }


}
?>
